package com.aspose.cells;

import java.util.Iterator;

class zbah {
   Workbook a;

   zbah(Workbook var1) {
      this.a = var1;
   }

   boolean a() throws Exception {
      if (this.a.getWorksheets().k != null && this.a.getWorksheets().k.getCount() > 0) {
         Iterator var5 = this.a.getWorksheets().k.iterator();

         zazv var6;
         do {
            if (!var5.hasNext()) {
               return false;
            }

            var6 = (zazv)var5.next();
         } while(var6.c == null || var6.c.getCount() <= 0);

         return true;
      } else {
         zvh var1 = this.a.getWorksheets().f();
         if (var1 != null) {
            return var1.a().b("Revision Log");
         } else if (!this.a.getSettings().i()) {
            return false;
         } else if (this.a.getWorksheets().f() != null) {
            return this.a.getWorksheets().f().a().a("Revision Log") != null;
         } else {
            if (this.a.b != null) {
               Iterator var2 = this.a.b.c.iterator();

               while(var2.hasNext()) {
                  Object var3 = var2.next();
                  znt var4 = (znt)var3;
                  if (var4.d.equals("application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml") || var4.d.equals("application/vnd.ms-excel.revisionHeaders")) {
                     return true;
                  }
               }
            }

            return false;
         }
      }
   }

   void b() {
      this.a.getSettings().b(false);
      zvh var1 = this.a.getWorksheets().f();
      this.a.getWorksheets().k = null;
      if (var1 != null) {
         var1.a().g("Revision Log");
         var1.a().g("User Names");
         this.a.getWorksheets().f = null;
         this.a.getWorksheets().a(false);
         this.a.getSettings().setShared(false);

         for(int var2 = 0; var2 < this.a.getWorksheets().getCount(); ++var2) {
            Worksheet var3 = this.a.getWorksheets().get(var2);
            var3.n = null;
         }
      }

   }
}
